GXFlattenJobToHdl
You can use theGXFlattenJobToHdl
function to flatten a job object into a handle.
Handle GXFlattenJobToHdl (gxJob aJob, Handle aHandle);
aJob
- A reference to the job object to be flattened.
aHandle
- The handle into which the flattened data is placed.
- function result
- The handle into which the flattened data is placed.
DESCRIPTION
TheGXFlattenJobToHdl
function provides your application with a mechanism for saving all information associated with a job object in a handle. You should call this function when a user saves a printable document.You specify a handle in the
aHandle
parameter. QuickDraw GX grows or shrinks the size of the handle you provide to accommodate the size of the job object. You can specifynil
in this parameter to allow QuickDraw GX to create and return a handle for you.When you save a printable document, you can write the handle to the file's resource or data fork. You cannot directly modify the contents of this handle.
When a user opens a printable document, you need to unflatten all information associated with a job object using the
UnflattenJobToHdl
function.If you do not wish to save data in a handle, you can also use the
GXFlattenJob
andGXUnflattenJob
functions to specify a function to save and restore a job object.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found, or there was not enough memory to load it. SEE ALSO
Listing 2-7 on page 2-25 shows how to use theGXFlattenJobToHdl
function to save a job object.To unflatten all information associated with a job object, see the
GXUnflattenJobFromHdl
function, which is described on page 2-58.You can also specify a function to save information associated with a job object by using the
GXFlattenJob
function, which is described in the next section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help